<table cellspacing="0" cellpadding="0">
    <tbody><tr><td></td><td></td></tr>
    </tbody>
</table>
<div class="wrapper">
    <table cellspacing="0" cellpadding="0" class="table-pager-function">
        <tbody>
            <tr class="pager-function">
                <td class="pager">
                    <div id="pagination">
                    </div>
                </td>
                <td class="function">
                    <input type="button" name="add" id="add" value="Add" class="add" />
                    <input type="button" name="delete" id="delete_product" value="Delete" class="delete" />
                    <input type="button" name="export_excel" id="export_excel" value="Export to excel" />
                    <input type="button" name="search" id="search" value="Seach" />
                </td>
            </tr>
        </tbody>
    </table>
    <table cellspacing="0" cellpadding="0" class='table-content'>
        <thead>
            <tr class='head'>
                <th class="header-table checkbox" style="width:50px;"><input type="checkbox" name="all_product" id="all_product" /></th>
                <th class="header-table <?= empty($aSort['name']) ? '' : ($aSort['name'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:200px;">
                    <span class="sort" id="sort_name" name="sort_name">Name</span>
                </th>
                <th class="header-table <?= empty($aSort['is_actived']) ? '' : ($aSort['is_actived'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:100px;">
                    <span class="sort" id="sort_is_actived" name="sort_status">Status</span>
                </th>
                <th class="header-table <?= empty($aSort['is_featured']) ? '' : ($aSort['is_featured'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:100px;">
                    <span class="sort" id="sort_is_featured" name="sort_featured">Featured</span>
                </th>
                <th class="header-table <?= empty($aSort['category']) ? '' : ($aSort['category'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:200px;">
                    <span class="sort" id="sort_category" name="sort_category">Category</span>
                </th>
                <th class="header-table <?= empty($aSort['level']) ? '' : ($aSort['level'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:100px;">
                    <span class="sort" id="sort_level" name="sort_level">Level</span>
                </th>
                <th class="header-table <?= empty($aSort['order']) ? '' : ($aSort['order'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:100px;">
                    <span class="sort" id="sort_order" name="sort_order">Order</span>
                </th>
                <th class="header-table <?= empty($aSort['date']) ? '' : ($aSort['date'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:100px;">
                    <span class="sort" id="sort_date" name="sort_date">Date</span>
                </th>
                <th class="header-table <?= empty($aSort['lang']) ? '' : ($aSort['lang'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:200px;">
                    <span class="sort" id="sort_lang" name="sort_lang">Lang</span>
                </th>
                <th class="header-table <?= empty($aSort['id']) ? '' : ($aSort['id'] == 'asc' ? 'sortasc' : 'sortdesc'); ?>" style="width:100px;">
                    <span class="sort" id="sort_id" name="sort_id">ID</span>
                </th>
                <th class="header-table" style="width:100px;">*</th>
            </tr>
            <tr class="search">
                <?php echo form_open('product/admincp/index/search', 'class="form-user" id="form_search" method="post'); ?>
                <td class="center">
                </td>
                <td><input type="text" id="search_name" name="search[name]" class="input-text" /></td>
                <td>
                    <select id="search_is_actived" name="search[is_actived]" class="select">
                        <option value="-1">All</option>
                        <option value="1">Active</option>
                        <option value="0">Inactive</option>
                    </select>
                </td>
                <td align="right">
                    <div style="margin-bottom: 5px;">
                        <select name="search[featured]" id="search_featured" class="select">
                            <option value="-1">All</option>
                            <option value="1">Featured</option>
                            <option value="0">UnFeatured</option>
                        </select>
                    </div>
                </td>
                <td><input  id="search_category" type="text" name="search[category]" class="input-text" /></td>
                <td align="right">
                    <div style="margin-bottom: 5px;">
                        <span class="date-from right">From:</span><input type="text" size="3"  name="search[level][from]" /><br />
                    </div>
                    <div>
                        <span class="date-to right">To:</span><input type="text" size="3" name="search[level][to]" />
                    </div>
                </td>
                <td align="right">
                    <div style="margin-bottom: 5px;">
                        <span class="date-from right">From:</span><input type="text" size="3" id="search_order_from" name="search[order][from]" /><br />
                    </div>
                    <div>
                        <span class="date-to right">To:</span><input type="text" size="3" id="search_order_to" name="search[order][to]" />
                    </div>
                </td>
                <td align="right">
                    <div style="margin-bottom: 5px;">
                        <span class="date right">From:</span><input type="text" size="8" id="search_date_from"  name="search[date][from]" class="date"/><br />
                    </div>
                    <div>
                        <span class="date right">To:</span><input type="text" size="8" id="search_date_to"  name="search[date][to]" class="date"/>
                    </div>
                </td>
                <td align="right">
                    <select name="search[language]" id="search_language" class="select">
                        <option value="-1">All</option>
                        <option value="1">English</option>
                        <option value="2">Vietnamese</option>
                    </select>
                </td>
                <td align="right">
                    <div style="margin-bottom: 5px;">
                        <span class="date-from right">From:</span><input type="text" size="3" id="search_id_from" name="search[id][from]" /><br />
                    </div>
                    <div>
                        <span class="date-to right">To:</span><input type="text" size="3" id="search_id_to" name="search[id][to]" />
                    </div>
                </td>
                <td></td>
                <?= form_close(); ?>
            </tr>
        </thead>
        <tbody id="body_list">
        </tbody>
    </table>
</form>
</div>
<table cellspacing="0" cellpadding="0" class="table-pager-function">
    <tbody>
        <tr class="pager-function">
            <td class="pager">
                <span class="title">
                    Page:
                </span>
                <span class="list-page">
                    1-2-3-4-5-6-7-8-9
                </span>
                <span class="pager-current">
                    of 53
                </span>
                <span class="separator">|</span>
                <span class="display">
                    Display:
                    <select id="">
                        <option value="">3</option>
                        <option value="">3</option>
                        <option value="">3</option>
                    </select>
                    per page
                </span>
            </td>
            <td class="function">
                <input type="button" name="add" id="add" value="Add" class="add" />
                <input type="button" name="delete" id="delete" value="Delete" class="delete" />
                <input type="button" name="export_excel" id="export_excel" value="Export to excel" />
                <input type="button" name="search" id="search" value="Seach" />
            </td>
        </tr>
    </tbody>
</table>

<div id="dialog_add" title="Add product">
    <?php echo form_open('product/admincp/index/ajax_save', 'method="post" class="form-add" id="form_add"'); ?>
    <input type="hidden" id="product_id" name="product[id]" value="" />
    <input type="hidden" id="product_cur_page" name="product[cur_page]" value="" />
    <ul>
        <li><a href="#product_info">Product info</a></li>
        <li><a href="#product_category">Category</a></li>
        <li><a href="#product_detail">Product detail</a></li>
        <li><a href="#meta_tag">Meta tag</a></li>
        <li><a href="#preview">Preview</a></li>
    </ul>
    <div id="product_info">
        <h2>General info</h2>
        <div class="error-message"></div>
        <table class="add-new" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        <label for="product_name">Name <span class="form-required" title="This field is required.">*</span></label>
                    </td>
                    <td>
                        <input id="product_name" class="input-text required" id="username" name="product[name]" value="" size="20" maxlength="60" type="text" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="product_order">Order <span class="form-required" title="This field is required.">*</span></label>
                    </td>
                    <td>
                        <input id="product_order" name="product[order]" value="" size="20" maxlength="254" class="input-text required" type="text" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="product_source">Source</label>
                    </td>
                    <td>
                        <input id="product_source" name="product[source]" value="" size="20" maxlength="254" class="input-text" type="text" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="product_level">Level</label>
                    </td>
                    <td>
                        <select id="product_level" name="product[level]" class="required">
                            <option value="1">Beginner</option>
                            <option value="2">Intermediate</option>
                            <option value="3">Difficulty</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="product_language">Language</label>
                    </td>
                    <td>
                        <select id="product_language" name="product[language]" class="required">
                            <option value="1">English</option>
                            <option value="2">Vietnamese</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="product_image">Image <span class="form-required" title="This field is required.">*</span></label>
                    </td>
                    <td>
                        <input type="hidden" name="product[image]" id="product_image" value="" />
                        <input class="input-text required" id="product_image_btn" name="product[image_btn]" size="20" maxlength="128" type="button" value="Choose image" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <label for="status">Status </label>
                        <div id="status" class="form-radios">
                            <input id="status_1" name="product[is_actived]" value="1" class="input-radio" type="radio" />  <label class="option" for="status_1">Active </label>
                            <input id="status_2" name="product[is_actived]" value="0" class="input-radio" type="radio" />  <label class="option" for="status_2">Inactive </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <label for="featured">Featured </label>
                        <div id="featured" class="form-radios">
                            <input id="status_1" name="product[is_featured]" value="1" class="input-radio" type="radio" />  <label class="option" for="status_1">Featured </label>
                            <input id="status_2" name="product[is_featured]" value="0" class="input-radio" type="radio" />  <label class="option" for="status_2">Unfeatured </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <label for="tag">Tag: </label>
                        <input type='text' name='tag_input' id='tag_input' />
                        <input type="button" class="input-text required" id="add_tag_btn" name="add_tag_btn" size="20" maxlength="128" value="Add">
                        <p class="howto">Separate tags with commas</p>
                        <div id="tag_container" class="form-input">
<!--                                        <span class='tag-item'>
                                <a href='#' class="tag-control"></a>
                                   <input class="product-tag" type="hidden" id="tag_1" name="product[tag]" value="isdklfks ksd k">
                                isdklfks ksd k
                            </span>-->
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div>
                            <input id="notify" name="product[notify]" value="1" class="input-checkbox" type="checkbox" />  <label class="option" for="notify">Notify user of new post. </label>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div id="product_category">
        <h2>Category</h2>
        <div class="error-message"></div>
        <div class="product-category">
            <ul id="product_category_tree" class="filetree treeview-famfamfam">
                <li class="closed"><span class="folder"><input type="checkbox" id="" name="product[category]" value="" checked="checked" />Php programming</span>
                    <ul>
                        <li class="closed"><span class="folder"><input type="checkbox" id="" name="product[category]" value="" checked="checked" />f asdf a</span>
                            <ul>
                                <li><span class="file"><input type="checkbox" id="" name="product[category]" value="" checked="checked" />fdas fadsf</span></li>
                            </ul>
                        </li>
                        <li class="closed"><span class="folder"><input type="checkbox" id="" name="product[category]" value="" checked="checked" />Folder 2</span>
                            <ul>
                                <li><span class="folder"><input type="checkbox" id="" name="product[category]" value="" checked="checked" />Subfolder 2.1</span>
                                    <ul id="folder">
                                        <li><span class="file">File 2.1.1</span></li>
                                        <li><span class="file">File 2.1.2</span></li>
                                    </ul>
                                </li>
                                <li class="closed"><span class="folder">Subfolder 2.2</span>
                                    <ul>
                                        <li><span class="file">File 2.2.1</span></li>
                                        <li><span class="file">File 2.2.2</span></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <li class="closed"><span class="folder">Folder 3 (closed at start)</span>
                            <ul>
                                <li><span class="file">File 3.1</span></li>
                            </ul>
                        </li>
                        <li><span class="file">File 4</span></li>
                    </ul>
                </li>
                <li class="closed"><span class="folder">Folder 2</span>
                    <ul>
                        <li><span class="folder">Item 2.1</span>
                            <ul>
                                <li><span class="file">Item 2.1.1</span></li>
                            </ul>
                        </li>
                    </ul>
            </ul>
        </div>
    </div>
    <div id="product_detail">
        <h2>Product detail</h2>
        <div class="error-message"></div>
        <h4>Summary</h4>
        <div class="product-summary">
            <textarea cols="92" rows="5" id="product_summary" name="product[summary]"></textarea>
        </div>
        <h4>Description</h4>
        <div class="product-description">
            <div id="product_description_slave"></div>
            <textarea cols="80" rows="20" id="product_description" name="product[description]"></textarea>
        </div>
    </div>
    <div id="meta_tag">
        <h2>Meta data</h2>
        <div class="error-message"></div>
        <div>
            <table class="add-new" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <td>
                            <label for="product_meta_title">Meta title </label>
                        </td>
                        <td>
                            <textarea name="product[meta_title]" class="text-area" id="product_meta_title" cols="50" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label for="product_meta_keyword">Meta keywords</label>
                        </td>
                        <td>
                            <textarea name="product[meta_keyword]" class="text-area" id="product_meta_keyword" cols="50" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label for="product_meta_description">Meta description</label>
                        </td>
                        <td>
                            <textarea name="product[meta_description]" class="text-area" id="product_meta_description" cols="50" rows="5"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label for="product_meta_robot">Meta robot</label>
                        </td>
                        <td>
                            <select name="product[meta_robot]" id="product_meta_robot">
                                <option selected="selected" value="all">Use Global</option>
                                <option value="index, follow">Index, Follow</option>
                                <option value="noindex, follow">No index, follow</option>
                                <option value="index, nofollow">Index, No follow</option>
                                <option value="noindex, nofollow">No index, no follow</option>
                            </select>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div id="preview">
        <h2>Content heading 3</h2>
        <p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.</p>
        <p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.</p>
    </div>

</form>

</div>
</div>
<input type="hidden" value="{pharse var='product.error_message_add'}" name="error_message_add" id="error_message_add"/>
<code class="hidden" id="upload_image"><!--<div class="upload-image-product">
    <?= form_open_multipart('product/admincp/index/uploadImage', 'class="form-delete" id="form_image_product"'); ?>
        <input type="file" id="product_image" name="product_image" />
    <?= form_close(); ?>
    </div>--></code>
<code class="hidden" id="row_product"><!-- <tr id="row_{product_id}" class="row">
        <td class="center">
        <input type="checkbox" name="delete[{product_id}]" id="{product_id}" class="product-select" />
        </td>
        <td class="product-name" id="product_name_{product_id}"> {product_name} </td>
        <td class = "center"> <span title="{product_status}" class="state {product_status}"></span></td>
        <td class = "center"> <span title="{product_featured}" class="state {product_featured}"></span></td>
        <td> {product_category} </td>
        <td> {product_level} </td>
        <td class = "right"> {product_order} </td>
        <td> {product_date} </td>
        <td> {language} </td>
        <td class="right"> {product_id}</td>
        <td> <a href = "#" id="edit_product_{product_id}" class = "edit-product"> Edit </a></td >
        </tr> -->
</code>
<div style="left: -2px; top: 0px; width: 1349px; height: 3498px; display: none;" id="loading_mask" >
    <p id="loading_mask_loader" class="loader"><img alt="Loading..." src="http://demo-admin.magentocommerce.com/skin/adminhtml/default/default/images/ajax-loader-tr.gif"><br>Please wait...</p>
</div>